<style type="text/css">
    .download_files{ float: right; padding-right: 10px;}
    .download_files span{ color: red;}
</style>
{assign var=formId value='add'}
<div id="content">
    <div class="highlight">
        {if isset($menu)}{$menu}{/if}
        {if $infoText}
            <div class="{$infoClass}">
                <h4>Result:</h4>
                <p>{$infoText}</p>
            </div>
        {/if}
        {include file="admin/toolbar.temp.html" title=toolbar}     
        <div class="formType">
            <form action="{$base_url}" method="post" id="{$formId}" name="{$formId}" enctype="multipart/form-data">
                <fieldset>
                	<div class="left">
                    	<div class="titles">{l s='infoneed'}</div>  
			<div style="clear:both;">
                            <ul class="tabs">
                                <li class="tab">{l s='Product Information'}</>
                                <li class="tab">{l s='Background'}</li>
                                {if $objectLanguages}
                                    {foreach $objectLanguages as $objectlang} 
                                        <li class="tab {if $objectlang@first}selected{/if}">{$objectlang->getField('name')}</li>
                                    {/foreach}
                                {/if}
                            </ul>
                            <div class="tabcontent">
                                <p>
                                    <span>{l s='Please choice a file for warranty of this category...'}</span>
                                    {if is_object($objectInfo)}
                                        {if $objectInfo->getField('file1') != ''}
                                        <a class="download_files" target="_blank" href="{$objectInfo->getFullUrlFile('file1')}"><span>{l s='Click here to download this file'}</span></a>
                                        {/if}
                                    {/if}
                                    <input type="file" name="file1" id="file1" />
                                </p>
                                <p>
                                    <span>{l s='Please choice a file for brochure of this category...'}</span>
                                    {if is_object($objectInfo)}
                                        {if $objectInfo->getField('file2') != ''}
                                            <a class="download_files" href="{$objectInfo->getFullUrlFile('file2')}"><span>{l s='Click here to download this file'}</span></a>
                                        {/if}
                                    {/if}
                                    <input type="file" name="file2" id="file2" />
                                </p>
                                <p>
                                    <span>{l s='Please choice a file for quick guide of this category...'}</span>
                                    {if is_object($objectInfo)}
                                        {if $objectInfo->getField('file3') != ''}
                                            <a class="download_files" href="{$objectInfo->getFullUrlFile('file3')}"><span>{l s='Click here to download this file'}</span></a>
                                        {/if}
                                    {/if}
                                    <input type="file" name="file3" id="file3" />
                                </p>
                                <br class="clear">
                            </div>
                            <div class="tabcontent">
                                <p>
                                    <span>{l s='Please choice a background for this news...'}</span>
                                    {if is_object($objectInfo)}
                                        {if $objectInfo->getField('background') != ''}
                                            <img src="{$objectInfo->getFullUrlBackGround()}" style="max-width: 696px; max-height: 400px;" /><br /><br />
                                        {/if}
                                    {/if}
                                    <input type="file" name="background" id="background" />
                                </p>
                                <br class="clear">
                            </div>
                            {if $objectLanguages}
                                {foreach $objectLanguages as $objectlang} 
                                    
                                    <div class="tabcontent {if $objectlang@first}selected{/if}">
                                        <p>
                                            <label for="name">{l s='name'} *</label>
                                            <span>{l s='name_help'}</span>
                                            <input type="text" name="{$objectlang->getField('code')}_name" value="{$objectInfo->getFieldLangAdmin($objectlang->getField('code'),'name')}" />
                                        </p>
                                        <p>
                                            <label for="abstract">{l s='abstract'} *</label>
                                            <span>{l s='abstract_help'}</span>
                                            <textarea name="{$objectlang->getField('code')}_abstract" class="mceSimple" style="width:97%">{$objectInfo->getFieldLangAdmin($objectlang->getField('code'),'abstract')}</textarea>
                                        </p> 
                                        <p>
                                            <label for="details">{l s='details'} *</label>
                                            <span>{l s='details_help'}</span>
                                            <textarea name="{$objectlang->getField('code')}_details" class="mceAdvanced" style="width:97%">{$objectInfo->getFieldLangAdmin($objectlang->getField('code'),'details')}</textarea>
                                        </p>      
                                        <br class="clear">
                                    </div>
                                {/foreach}
                            {/if}
                        </div>
					</div>
                    <div class="right">  
                    	<div class="titles">{l s='infononeed'}</div> 
                        <div id="accordion">
                            
                            <div class="title">{l s='properties'}</div>
                            
                            <div class="content">
                                <!--<input type="hidden" name="cid" value="{$pid}" />-->
                                <p>
                                    <label for="cid">{l s='parent'} *</label>
                                    <span>{l s='parent_help'}</span>
                                    <select name="cid">
                                    <option value="{$pid}">/</option>
                                        {$listCategories}
                                    </select>
                                </p>                              
                                <p>
                                    <label for="status">{l s='status'} *</label>
                                    <span>{l s='status_help'}</span>
                                    <select name="status">
	                                    {$listStatus}
                                    </select>
                                </p> 
<!--                                                                                                  
                                <p>
                                    <label for="slug">{l s='slug'}</label>
                                    <span>{l s='slug_help'}</span>
                                    <input type="text" name="slug" value="{$slug}" />
                                </p> 
-->
                                <p>
                                    <label for="vn_name">{l s='keywords'} *</label>
                                    <span>{l s='keywords_help'}</span>
                                    <input type="text" id="keywords" name="keywords" value="{$keywords}" />
                                </p> 
                                <p>
                                    <label for="vn_name">{l s='position'} *</label>
                                    <span>{l s='position_help'}</span>
                                    <input type="text" id="position" name="position" value="{$position}" />
                                </p>  
                                <p class="radioType">
                                    <input type="checkbox" name="home" {if $home eq 1}checked="checked"{/if} value="1">
                                    <label for="home">{l s='home'}</label><br>
                                     <span>{l s='home_help'}</span>
                                </p> 
                            </div>
                            
                        </div>
                                                                 
					</div>
                    <div class="over">                        
                        <p class="btnType">
                            <input type="hidden" id="op"  name="op" value="{$op}" />
                            <input type="hidden" id="act" name="act" value="{$act}" />                        
                            <input type="hidden" id="pid" name="pid" value="{$pid}" />
                            <input type="hidden" id="oId" name="oId" value="{$oId}" />
                            <input type="hidden" id="plus" name="plus" value="saveItem" />
                        </p>
					</div>                        
                </fieldset>
            </form>
        </div>
    </div>
</div>